var SaturnAjaxConfirm = function(buttonid){
	this.id = buttonid;
};  
SaturnAjaxConfirm.prototype.send =function(action,param){
    var action = action;
	var myAjax = new Ajax.SaturnRequest(
			action,{
				method: 'post',
				parameters: param,
				onComplete: this.callback,
				args:this.id
			}
	);
};
SaturnAjaxConfirm.prototype.callback=function(response,id){
	var xmlDOM = response.responseXML;
	var root = xmlDOM.documentElement;
	var length = root.getElementsByTagName("map").item(0).childNodes.length;
	var element = root.getElementsByTagName("map").item(0).getElementsByTagName("value"); 
	for(var i=0;i<length;i++){
	        if(element[i].getAttribute("key")=="jc_checkall"){
	            if(element[i].firstChild.nodeValue=="F"){
	            	$(id).disabled = true;
	            }
	            continue;
	        }
	        var id = element[i].getAttribute("key");
	        $(id).innerHTML=check(element[i].firstChild.nodeValue);
        }
};
function check(value){
	if(value=="F"){
		return "<font style='color: red'>不合格</font>"
	}
	if(value=="T"){
		return "<font style='color: black'>合格</font>"
	}

}
